home *** CD-ROM | disk | FTP | other *** search
- #ifndef _HIPPOSTRUCT_H_
- #define _HIPPOSTRUCT_H_
-
- /*
- * hippostruct.h - definitions to structures in hippo package.
- * Structures were put in a separate file so the RCS version
- * number changes only when the structures have been changed.
- *
- * Paul Rensing, May 2, 1991
- *
- * Copyright (C) 1991 The Board of Trustees of The Leland Stanford
- * Junior University. All Rights Reserved.
- *
- * $Id: hippostruct.h,v 3.8 1992/03/19 02:13:21 rensing Rel $
- */
-
-
- /*
- * ntuple/display structure version number (maintained by RCS)
- */
- #define STRUCT_VERSION "$Id: hippostruct.h,v 3.8 1992/03/19 02:13:21 rensing Rel $"
-
- /*
- * the "magic number", which is "h_" (in ASCII),
- * for the start of hippo data files.
- */
- #define MAGIC "\150\137" /* circumvent the EBCDIC strings */
-
- /*
- * allowed length of function name used in registry.
- */
- #define FUNCNAMELEN 32
-
- /*
- * a rectangle. Designed to match NeXT's NXRect
- */
- typedef struct
- {
- struct
- {
- float x, y;
- } origin;
- struct
- {
- float width, height;
- } size;
- } rectangle;
-
-
- /*
- * structure to keep lists of functions.
- * Maintain as linked lists for ease of use.
- */
- typedef struct fid_str
- {
- char name[FUNCNAMELEN+1];
- int (*funcPtr)();
- double *paramBlk;
- int blkSize; /* parameter block size in nParam */
- linestyle_t lineStyle; /* linestyle; needed for overplot funcs */
- struct fid_str *next;
- } func_id_t, *func_id;
-
- typedef struct
- {
- struct
- {
- char fixed; /* fixed bins */
- char dirty; /* bins are dirty, re-bin */
- char dummies[2]; /* keep struct length to multiply of 4 */
- } flags;
-
- struct
- {
- int nBins;
- float low;
- float high;
- float moments[3]; /* moments[n] = sum of weight*var^n */
- } xAxis, yAxis;
-
- float *data; /* contents of bins */
- float *variance; /* variance (error^2) of bins */
- float totals[3][3]; /* overflow and underflow */
- float binMin;
- float binMax;
- int binAlloc; /* amount of space allocated for bins */
- int ndata; /* number of data points binned */
- } bins_t;
-
-
- typedef struct
- {
- float low; /* lower limit for axis */
- float high; /* upper limit for axis */
- char *label; /* label for axis */
- struct
- {
- char log; /* false=linear axis,true=log10 axis */
- char autoScale; /* flag to autoscale axis */
- char tickLocation; /* or of LEFT,RIGHT,TOP,BOTTOM */
- char labelLocation;
- char scaleLocation;
- char autoTick;
- char dummies[2]; /* keep struct length to multiply of 4 */
- } flags;
- float tickLength;
- float scaleFontSize;
-
- float firstTick;
- float tickStep;
- int numMinorTicks; /* number of minor ticks betw. major */
- } axis_t;
-
- typedef struct
- {
- int x; /* n-tuple variable we use as x */
- int y; /* " " " y */
- int z; /* " " " z */
- int weight; /* " " " weight */
- int xerror; /* " " " x error */
- int yerror; /* " " " y error */
- } bind_strt_t;
-
-
- /*
- * Structure defining the data for an n-tuple.
- */
- typedef struct
- {
- int ndim; /* number of dimensions of data */
- int rev; /* revision number; incr if clear n-tuple */
-
- float *data; /* array of data */
- int ndata; /* number of data points */
- int memAlloc; /* size of data array */
-
- int extremeBad; /* TRUE if nlow/nhigh could be bad */
- float *nlow; /* lowest value for dimension n */
- float *nhigh; /* highest value for dimension n */
-
- char *title; /* title of whole ntuple */
- char **label; /* label for dimension n */
- } ntuple_t, *ntuple;
-
-
- /*
- * Structure defining data for a hippo display.
- */
- typedef struct
- {
- ntuple ntuple; /* ntuple from which bins are made */
- int nt_rev; /* rev no. of ntuple when last displayed */
- char *ntFile; /* file name for ntuple if by reference */
-
- int dim; /* dimension of graph; internal only */
- graphtype_t graphtype; /* type of graph, e.g. lego, scatter, etc */
- drawtype_t drawtype; /* type of drawing, e.g. point, line, etc */
-
- struct
- {
- char drawTitles; /* if true, draw titles and axis labels */
- char drawAxes; /* if true, draw axes */
- char ntByReference; /* variable "ntuple" is actually integer */
- char dummies[5];
- } flags;
-
- char *title; /* title */
-
- bins_t bins; /* the bins */
-
- axis_t xAxis,yAxis,zAxis;
-
- plotsymbol_t plotSymbol; /* plot symbol, line style */
- float symbolSize;
- linestyle_t lineStyle;
-
- bind_strt_t binding; /* binding of n-tuple dim. to plot quantity */
-
- rectangle drawRect; /* specify rectangle within which we draw */
- rectangle marginRect; /* the margin area within the above */
-
- func_id nt_cut; /* list of cuts on ntuple data */
- func_id bin_func; /* list of bin transform funcs */
- func_id plot_func; /* list of overplot functions */
- func_id binToColor; /* transfer function for greyscale/color */
- } display_t, *display;
-
-
- /*
- * structure to hold a hippo record. Only used by the internal IO routines.
- */
- typedef struct
- {
- char *magic;
- char *s_version;
- ntuple *nt_list;
- int num_nt;
- display *disp_list;
- int num_disp;
- } hippo_rec;
-
-
- #endif /* _HIPPOSTRUCT_H_ */
-